package com.ysd.lis.controller.inv;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvTransferType;
import com.ysd.lis.request.Params;
import com.ysd.lis.request.inv.InvSupplierPageParam;
import com.ysd.lis.request.inv.TransferTypeDto;
import com.ysd.lis.service.inv.InvTransferTypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wanghuaixing
 * @since 2024-09-11
 */
@RestController
@RequestMapping("/inv/transfer/type")
public class InvTransferTypeController extends BaseController {

    @Autowired
    InvTransferTypeService invTransferTypeService;

    @ApiOperation("分页查询")
    @GetMapping("/findInvTransferTypePageList")
    public Result findInvTransferTypePageList(InvSupplierPageParam params){
        return invTransferTypeService.findInvTransferTypePageList(params);
    }

    @ApiOperation("查询")
    @GetMapping("/findInvTransferTypeList")
    public Result findInvTransferTypeList(InvSupplierPageParam params){
        return invTransferTypeService.findInvTransferTypeList(params);
    }
    @ApiOperation("新增")
    @PostMapping("/addInvTransferType")
    public Result addInvTransferType(@RequestBody InvTransferType transferType){
        return  invTransferTypeService.addInvTransferType(transferType);
    }

    @ApiOperation("修改")
    @PostMapping("/editInvTransferType")
    public Result editInvTransferType(@RequestBody InvTransferType transferType) {
        return invTransferTypeService.editInvTransferType(transferType);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteInvTransferType")
    public Result deleteInvTransferType(@RequestBody InvTransferType transferType) {
        return invTransferTypeService.deleteInvTransferType(transferType);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInvTransferTypeList")
    public Result batchDeleteInvTransferTypeList(@RequestBody TransferTypeDto dto){
        return  invTransferTypeService.batchDeleteInvTransferTypeList(dto);
    }

}
